package com.contextor.magiccards.web.amf;

import com.contextor.magiccards.web.to.Response;
import com.contextor.magiccards.web.to.user.PersonageTO;
import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.stereotype.Service;

/**
 * User: Sergey
 * Date: 24.04.2011 13:27:32
 */
@Service
@RemotingDestination
public class AmfCharacterService extends BaseAmfService {

    public Response<PersonageTO> loafCharacter(String uid) {
        logger.info("loafCharacter; uid={}", uid);
        try {
            return new Response<PersonageTO>(characterHandler.loadUserCharacter(uid));
        } catch (Throwable e) {
            return onError(e);
        }
    }
}
